package com.cy.pj.sys.controller;

import com.cy.pj.common.vo.JsonResult;
import com.cy.pj.common.vo.PageObject;
import com.cy.pj.sys.entity.SysRole;
import com.cy.pj.sys.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 逗逼子民
 * @Date: 2019/7/11 16:51
 * @Description:
 */
@RequestMapping("/role/")
@RestController
public class SysRoleController {
    @Autowired
    private SysRoleService sysRoleService;
    @RequestMapping("doFindObjectById")
    public JsonResult doFindObjectById(Integer id) {
        return new JsonResult(sysRoleService.findObjectById(id));
    }
    @RequestMapping("doFindPageObjects")
    public JsonResult doFindPageObjects(
            String name,Integer pageCurrent) {
        return new JsonResult(
                sysRoleService.findPageObjects(name,
                        pageCurrent));
    }

}
